#{extends 'CRUD/layout.html' /}
#{set title:messages.get('crud.list.title', type.name) /}

<div class="col-lg-12">
	<div class="${type.name} panel panel-default">
		<div class="panel-heading">
	    	<h3 class="panel-title">&{'crud.list.title', type.name}</h3>
	  	</div>
		<div class="panel-body">
			
			<div class="col-lg-12 table-responsive">
				%{
					List fields = [];
					if(type.name=='Articles'){
						fields.add('articleTitle')
						fields.add('articleCategory')
						fields.add('articleHidden')
						fields.add('createDate')
					}
					if(type.name=='Abouts'){
						fields.add('aboutTopic')
						fields.add('aboutContent')
						fields.add('aboutMapImages')
						fields.add('createDate')
					} 
				 }%
		        #{crud.table fields:fields as String[]}
		        #{/crud.table}
		    </div>
			<div class="col-lg-2 pull-right">
		        <a class="btn btn-primary" href="@{blank()}">&{'crud.add', type.modelName}</a>
		    </div>
		    <div class="col-lg-10">
		        #{crud.pagination /}
		    </div>
		
		    
		</div>
	</div>
</div>